{% load staticfiles %}
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>AdminLTE 2 | Log in</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="{% static "favicon.ico" %}">
    <link rel="icon" href="{% static "favicon.png" %}" type="image/png">
    <link rel="stylesheet" href="{% static "adminlte/css/AdminLTE.min.css" %}">
    <link rel="stylesheet" href="{% static "layui/2.2.6/css/layui.css" %}">
    <script src="{% static "layui/2.2.6/layui.js" %}"></script>
    <link rel="stylesheet" href="{% static "style.css" %}">
</head>
<body>
    <div id="app">
        <div class="login">
            <div class="login-box">
                <div class="login-logo">
                    <b>Admin</b>LTE
                </div>
                <!-- /.auth-logo -->
                <div class="login-box-body">
                    <p class="login-box-msg">填写正确的登录信息完成登录</p>
                    <form class="layui-form" action="" method="post">
                        {% csrf_token %}
                        {% for item in login_form %}
                        <div class="layui-form-item">
                            <label class="layui-form-label">{{item.label}}</label>
                            <div class="layui-input-block">
                             {{ item }}
    {#                        <input type="{{item.field.widget.input_type}}" id="{{ item.id_for_label }}"  name="{{ item.html_name }}" class="layui-input" placeholder="{{ item.label }}">#}
                            </div>
                        </div>
                        {% endfor %}
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">登 录</button>
                            </div>
                        </div>
                        {% if messages %}
                        <div class="layui-form-item">
                            {% for msg in messages %}
                            <p {% if msg.tags %} class="{{ msg.tags }}"{% endif %}>{{ msg }}</p>
                            {% endfor %}
                        </div>
                        {% endif %}
                    </form>
                </div>
                <!-- /.auth-box-body -->
            </div>
        </div>
        </div>
        <script>
            layui.config({
                base: '{% static 'modules' %}/' //你存放新模块的目录，注意，不是layui的模块目录
            }).use('login'); //加载入口
        </script>
</body>
</html>
